home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 27 / CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso / CUCD / Programming / THXPlayLib / src / test / BangTest.e
Encoding:
Text File  |  1998-06-17  |  1010 b   |  29 lines

  1. -> an example of using the E module player, rather than the library,
  2. -> and using the 'noteplay' interface.
  3.  
  4. -> Press RMB to hear the special sound while the music plays.
  5. -> You can also press LMB to hear it on the other speaker, but note
  6. -> that it will probably be distorted.
  7. -> Press both mouse buttons, or press CTRL-C to exit.
  8.  
  9. MODULE 'tools/thx-play'
  10.  
  11. PROC main()
  12.   IF thxInit({module}) THEN RETURN
  13.   thxPlay()
  14.   REPEAT
  15.     WaitTOF(); WaitTOF(); WaitTOF(); WaitTOF()
  16.     IF Mouse()=1 THEN thxPlayNote(3, 1, 15) -> left channel  (3)
  17.     IF Mouse()=2 THEN thxPlayNote(1, 1, 15) -> right channel (1)
  18.   UNTIL CtrlC() OR (Mouse()=3)
  19.   thxSetSong(1); thxPlay(); REPEAT; UNTIL thxPlaytime() >= 2
  20.   thxFree()
  21. ENDPROC
  22.  
  23. module: INCBIN 'MODS:thx/THXmuzza/Pink/THX.Strange'
  24. -> THX.Strange is from 'Klub Diznee'
  25.  
  26. -> instrument 15 is the 'special' instrument, channel 3 is kept empty
  27. -> in the song, but channel 1 completely unusable, and I really just
  28. -> wanted to show that you can use more than one channel at once
  29.